package com.neuedu.ylbx.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import java.io.Serializable;

@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name="InpatientDisease对象")
public class InpatientDisease implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "住院患者表外键")
    @OneToOne(optional = true)
    @JoinColumn(name = "id")
    private Integer patientId;

    @Schema(description = "疾病表外键")
    @OneToOne(optional = true)
    @JoinColumn(name = "id")
    private Integer diseaseId;

    @Schema(description = "疾病诊断时间")
    private java.util.Date orderTime;

    @Schema(description = "诊断类型（1、入院诊断，2、主要诊断，3、其他诊断）")
    private Byte diseaseType;

}